package com.rin.design_pattern.abstract_factory;

import com.rin.design_pattern.common.color.ColorType;
import com.rin.design_pattern.common.shape.ShapeType;

/**
 * @author RinMi
 * @since 2023/5/26
 */
public class ThemeType {

    private static final ThemeType THEME_TYPE = new ThemeType();

    private String shapeType;
    private String colorType;

    private ThemeType(){

    }

    public static ThemeType makeRedCircle() {
        THEME_TYPE.setShapeType(ShapeType.CIRCLE);
        THEME_TYPE.setColorType(ColorType.RED);
        return THEME_TYPE;
    }

    public static ThemeType makeGreenSquare() {
        THEME_TYPE.setShapeType(ShapeType.SQUARE);
        THEME_TYPE.setColorType(ColorType.GREEN);
        return THEME_TYPE;
    }

    public static ThemeType makeBlueRectangle() {
        THEME_TYPE.setShapeType(ShapeType.RECTANGLE);
        THEME_TYPE.setColorType(ColorType.BLUE);
        return THEME_TYPE;
    }

    public static ThemeType customTheme(String shapeType, String colorType) {
        THEME_TYPE.setShapeType(shapeType);
        THEME_TYPE.setColorType(colorType);
        return THEME_TYPE;
    }

    public String getShapeType() {
        return shapeType;
    }

    public void setShapeType(String shapeType) {
        this.shapeType = shapeType;
    }

    public String getColorType() {
        return colorType;
    }

    public void setColorType(String colorType) {
        this.colorType = colorType;
    }
}
